Fix bug#10489: 24.0.92 `dired-do-copy' may create infinite directory hierarchy.
authorthierry volpiatto <thierry.volpiatto@gmail.com>
Fri, 24 Feb 2012 18:04:03 +0000 (19:04 +0100)
committerthierry volpiatto <thierry.volpiatto@gmail.com>
Fri, 24 Feb 2012 18:04:03 +0000 (19:04 +0100)
commitfd4d72713880e41dbecc4fbdcbd105cb34ef0f78
treecd96d72e96587f05cd7e0363b9e145cc31d1107c
parent4ca8ce7e1cae4fcf23734b955afa21cf6a7c916c
Fix bug#10489: 24.0.92 `dired-do-copy' may create infinite directory hierarchy.

* lisp/files.el (files-equal-p): New, simple equality check between two filename.
(file-subdir-of-p): New, Check if dir1 is subdir of dir2.
(copy-directory): Return error when trying to copy a directory on itself.
Add missing copy-contents arg to tramp handler.

* lisp/dired-aux.el (dired-copy-file-recursive): Same.
(dired-create-files): Modify destination when source is equal to dest when copying files.
Return also when dest is a subdir of source.
lisp/ChangeLog
lisp/dired-aux.el
lisp/files.el